﻿<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>【框架内容：包含顶部、导航、内容】</title>
    <link href="../customer/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
	<link href="../customer/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />
    <link href="../customer/basic/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="../customer/css/hmstyle.css" rel="stylesheet" type="text/css"/>
	<link href="../customer/css/skin.css" rel="stylesheet" type="text/css" />
    <script src="../customer/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
	<script src="../customer/AmazeUI-2.4.2/assets/js/amazeui.min.js"></script>
    
</head>
<body>
	<s:action name="furnitureTypeAction!showFurnitureType" executeResult="false"></s:action>
	<s:action name="furnitureTypeAction!showFurnitureByTypeToHome" executeResult="false"></s:action>
	<div class="hmtop">
	<!--顶部导航条 -->
	<div class="am-container header">
		<ul class="message-l">
			<div class="topMessage">
				<div class="menu-hd">
					<s:if test="#session.customer">
					欢迎你，<s:property value="#session.customer.customerId"/>，<a href="Customer_CustomerExit.action">退出</a>
				</s:if>
				<s:else>
					<a href="CustomerLogin.jsp" target="_top" class="h">亲，请登录</a>
					<a href="Register.jsp" target="_top">免费注册</a>
				</s:else>
				</div>
			</div>
		</ul>
		<ul class="message-r">
			<div class="topMessage home">
				<div class="menu-hd"><a href="../customer/index.jsp" target="_top" class="h">商城首页</a></div>
			</div>
			<div class="topMessage my-shangcheng">
				<s:if test="#session.customer">
					<div class="menu-hd MyShangcheng"><a href="CustomerInfo.jsp" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</s:if>
				<s:else>
					<div class="menu-hd MyShangcheng"><a href="CustomerLogin.jsp" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</s:else>			</div>
			<div class="topMessage mini-cart">
				<div class="menu-hd"><a id="mc-menu-hd" href="showShoppingCarAction.action" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span></a></div>
			</div>
			<!-- 
			<div class="topMessage favorite">
				<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
			 -->
		</ul>
		</div>

		<!--悬浮搜索框-->

		<div class="nav white">
			<div class="logo"><img src="../images/logo.png" /></div>
			<div class="logoBig">
				<li><a href="../customer/index.jsp" target="_top"><img src="../customer/images/logo.png" /></a></li>
			</div>

			<div class="search-bar pr">
			<a name="index_none_header_sysc" href="#"></a>
			
				<input id="search" name="keyword" type="text" placeholder="搜索" autocomplete="off"  value="<s:property value="#session.keyword"/>" class="search" onkeypress="search()">
				<input id="ai-topsearch" class="submit am-btn"  value="搜索" index="1" type="submit" onclick="clicksearch()">
			
		</div>
		</div>
		<div class="clear"></div>
	</div>
	<!--轮播 -->
	<div class="banner">
		<div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
			<ul class="am-slides">
				<li class="banner1"><a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=6"><img src="../customer/images/ad5.jpg" /></a></li>
				<li class="banner2"><a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=7"><img src="../customer/images/ad6.jpg" /></a></li>
				<li class="banner3"><a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=8"><img src="../customer/images/ad7.jpg" /></a></li>
				<li class="banner4"><a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=9"><img src="../customer/images/ad8.jpg" /></a></li>
			</ul>
		</div>
		<div class="clear"></div>	
	</div>
	<div class="shopNav">
		<div class="slideall">
			   <div class="long-title"><span class="all-goods">全部分类</span></div>
			   <div class="nav-cont">
					<ul>
						<li class="index"><a href="../customer/index.jsp">首页</a></li>
                            <!--  <li class="qc"><a href="#">活动</a></li> -->
                            
                             <li class="qc last"><a href="#"> 品牌简介</a></li>
					</ul>
				</div>					
        				
				<!--侧边导航 -->
				<div id="nav" class="navfull">
					<div class="area clearfix">
						<div class="category-content" id="guide_2">
							<div class="category">
							<s:iterator value="#session.typeToShow"   id="yui">
<%-- 					<c:forEach varStatus="suff" var="names" items="${typeToShow}"> --%>
							<s:if test="#yui.pid==0">
								<ul class="category-list" id="js_climit_li">
									<li class="appliance js_toggle relative first">
								
										<div class="category-info">				 
												<h3 class="category-name b-category-name"><a class="ml-22" title="大类"><s:property value="#yui.type"/></a></h3>
												<em>&gt;</em>
										</div>
												<div class="menu-item menu-in top">
													<div class="area-in">
														<div class="area-bg">
															<div class="menu-srot">
																<div class="sort-side">
																	<dl class="dl-sort">
																	<s:iterator value="#session.typeToShow"  id="ty">
																			<s:if test="#ty.pid==#yui.id">
																				<dd><a href="FurnitureInfo_searchingByKeyMapToCustomer.action?category.id=<s:property value="#ty.id"/>"><span><s:property value="#ty.type"/> </span></a></dd>
																			</s:if>
																	</s:iterator>
																		<%-- <c:forEach var="subList" varStatus="status" items="${TypeName[names]}"> 
																			<dd><a href="productAction.action?productTypeName=${subList}"><span>${subList}</span></a></dd>
																		</c:forEach> --%>
																	</dl>
																</div>
															</div>
														</div>
													</div>
												</div>
									<b class="arrow"></b>	
									</li>
								</ul>
							</s:if>
<%-- 					</c:forEach> --%>
							</s:iterator>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--显示二级目录-->				
	<script type="text/javascript">
		(function() {
			$('.am-slider').flexslider();
		});
		$(document).ready(function() {
			$("li").hover(function() {
				$(".category-content .category-list li.first .menu-in").css("display", "none");
				$(".category-content .category-list li.first").removeClass("hover");
				$(this).addClass("hover");
				$(this).children("div.menu-in").css("display", "block")
			}, function() {
				$(this).removeClass("hover")
				$(this).children("div.menu-in").css("display", "none")
			});
		})
	</script>	
	
 <%-- <!--热门活动 -->
	<div class="am-container activity ">
		<div class="shopTitle ">
			<h4>活动</h4>
			<h3>每期活动 教你 装修 </h3>
			<span class="more ">
            	 <a href="# ">全部活动<i class="am-icon-angle-right" style="padding-left:10px ;" ></i></a>
            </span>
		</div>
	  	<div class="am-g am-g-fixed ">
			<div class="am-u-sm-3 ">
				<div class="icon-sale one "></div>	
					<h4>简约</h4>							
				<div class="activityMain ">
					<img src="../customer/images/activity1.jpg "></img>
				</div>
				<div class="info ">
					<h3>by 王木木</h3>
				</div>														
			</div>
		
			<div class="am-u-sm-3 ">
			  <div class="icon-sale two "></div>	
				<h4>简约</h4>
				<div class="activityMain ">
					<img src="../customer/images/activity1.jpg "></img>
				</div>
				<div class="info ">
					<h3>by Tom</h3>								
				</div>							
			</div>						
		
			<div class="am-u-sm-3 ">
				<div class="icon-sale three "></div>
				<h4>欧式</h4>
				<div class="activityMain ">
					<img src="../customer/images/activity1.jpg "></img>
				</div>
				<div class="info ">
					<h3>by zhaokai</h3>
				</div>							
			</div>						

			<div class="am-u-sm-3 last ">
				<div class="icon-sale "></div>
				<h4>奢华</h4>
				<div class="activityMain ">
					<img src="../customer/images/activity1.jpg "></img>
				</div>
				<div class="info ">
					<h3>by xueyi</h3>
				</div>													
			</div>
		</div>
	</div>
	<div class="clear "></div> --%>
	
	
	<!-- 展示每个大类最新的商品 -->
	<div class="am-container activity ">
		<s:iterator value="#session.typeToShow" id="name">
			<s:if test="#name.pid==0">
			<%-- <s:if test="#request.products.get(#names).size>3"> --%>
				<div class="shopTitle">
					<h4><s:property value="#name.type"/></h4>
					<h3>热门推荐 </h3>
					<span class="more ">
		            	 <a href="FurnitureInfo_searchingByKeyMapToCustomer.action?category.id=<s:property value="#name.id"/>"/>查看全部<i class="am-icon-angle-right" style="padding-left:10px ;" ></i></a>
		            </span>
				</div>
				<div class="am-g am-g-fixed ">
					<s:iterator value="#session.products.get(#name.type)" id="list" status='st'>	
						<s:if test="#st.Count<=4">
						  	<a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=<s:property value="#list.objId" /> ">
								<div class="am-u-sm-3 ">						
									<div class="activityMain ">
										<img src="<s:property value="#list.picture_one"/>"></img>						
									</div>
									<%-- <div class="info ">
										 <i class="am-icon-shopping-basket am-icon-md  seprate"></i> 
									</div>--%>
									<s:property value="#list.furnitureName" />	
									<h3>¥<s:property value="#list.salePrice" /></h3>
																						
								</div>
							</a>
						</s:if>
					</s:iterator>
				</div>
<%-- 			</s:if> --%>
			</s:if>
		</s:iterator>
	</div>
	<div class="clear "></div>
<script type="text/javascript">
	function search(){
		if(event.keyCode==13){
			var val=document.getElementById("search").value;
			window.location="FurnitureInfo_searchingByKeyMapToCustomer.action?keyword="+encodeURI(encodeURI(val));
		}
	}
	function clicksearch(){
		var val=document.getElementById("search").value;
		window.location="FurnitureInfo_searchingByKeyMapToCustomer.action?keyword="+encodeURI(encodeURI(val));
}
</script>
</body>
</html>